package com.eeepay.eeepay_v2.adapter;

import android.content.Context;

import com.eeepay.eeepay_v2.R;
import com.eeepay.eeepay_v2.model.AccountInfo;
import com.eeepay.v2_library.adapter.ABBaseAdapter;
import com.eeepay.v2_library.adapter.ABViewHolder;

/**
 * Created by Ching on 2016/3/17.
 * 账户余额
 */
public class AccountAdapter extends ABBaseAdapter<AccountInfo> {


    public AccountAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_account_list;
    }

    @Override
    public void convert(ABViewHolder holder, AccountInfo model) {
        holder.setRightText(R.id.lrt_account_time, model.getTime());
        holder.setRightText(R.id.lrt_account_income, model.getIncome());
        holder.setRightText(R.id.lrt_account_sum, model.getSum());
        holder.setRightText(R.id.lrt_account_use_sum, model.getUseSum());
        holder.setRightText(R.id.lrt_account_digest, model.getDigest());
        holder.setRightTextColor(R.id.lrt_account_digest, R.color.green);
    }
}
